home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / refex / ex52.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  343 b   |  18 lines

  1. Program Example52;
  2.  
  3. { Program to demonstrate the Rewrite function. }
  4.  
  5. Var F : File;
  6.     I : longint;
  7.  
  8. begin
  9.   Assign (F,'Test.dat');
  10.   { Create the file. Recordsize is 4 } 
  11.   Rewrite (F,Sizeof(I));
  12.   For I:=1 to 10 do
  13.     BlockWrite (F,I,1);
  14.   close (f);
  15.   { F contains now a binary representation of
  16.     10 longints going from 1 to 10 }
  17. end.
  18.